﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using com.subb.WebInformation;
using WebEntities;
using WebsiteUI.Extensions;

namespace WebsiteUI.Controllers
{
    /// <summary>
    /// 技术交流 栏目
    /// </summary>
    public class TechnologyController : Controller
    {
        [OutputCache(CacheProfile = "Cache15Mins")]
        public ActionResult Index()
        {
            WI_NewsDAL ndal = new WI_NewsDAL();
            //获取2条科研院所新闻
            List<WI_News> list1 = ndal.GetAllNews(CommonFn.GetContentID("ResearchRoomID"), 0, 2);
            ViewBag.ResearchRoomID = CommonFn.GetContentID("ResearchRoomID");
            ViewBag.ResearchRoomList = list1;

            //获取20条行业论文新闻
            List<WI_News> list2 = ndal.GetAllNews(CommonFn.GetContentID("IndustryDocID"), 0, 20);
            ViewBag.IndustryDocID = CommonFn.GetContentID("IndustryDocID");
            ViewBag.IndustryDocList = list2;

            //获取5条行业论文新闻
            List<WI_News> list3 = ndal.GetAllNews(CommonFn.GetContentID("IndustryTrendID"), 0, 5);
            ViewBag.IndustryTrendID = CommonFn.GetContentID("IndustryTrendID");
            ViewBag.IndustryTrendList = list3;

            return View();
        }
    }
}
